package com.matu.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;


/**
 * Classe outil permettant de fournir des fonctions
 * génériques.
 * @author matu
 *
 */
public class ToolBox {
	
	
	public static final double coordXPaulSab = 43.56288139999999; 
	public static final double coordYPaulSab = 1.4661701;
	
	
	/**
	 * Convertit un Json en String
	 * @param is
	 * @return Json converti en String
	 * @throws IOException
	 */
	public static String convertToString(InputStream is) throws IOException {
		String line, res = "";
		BufferedReader rd = new BufferedReader(new InputStreamReader(is));

		while ((line = rd.readLine()) != null) {
			res += line;
		}
		rd.close();
		
		return res;
	}
}
